package com.hnust.listener.abstracts;

import com.cleveroom.container.BufferType;
import com.cleveroom.core.CRMDevice;
import com.cleveroom.interfaces.IDeviceListner;

/**
 * 创建人：zhangRuWang
 * 创建时间：2022/4/19
 * 描述：
 */
public abstract class SensorListener implements IDeviceListner {
    @Override
    public void onDeviceChange(CRMDevice crmDevice, BufferType bufferType) {
        if(bufferType==BufferType.SENSORBUFFER){
            onDeviceChange(crmDevice);
        }
    }
    protected abstract void onDeviceChange(CRMDevice crmDevice);
    @Override
    public void onAddNewDevice(CRMDevice crmDevice, BufferType bufferType) {
        if(bufferType==BufferType.SENSORBUFFER){
            onAddNewDevice(crmDevice);
        }
    }
    protected abstract void onAddNewDevice(CRMDevice crmDevice);
}
